Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-reiff committed Apr 29, 2024
1 parent 6ba4cab commit ae27149
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/pages-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Github Pages Release

on:
workflow_call:

jobs:
Build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: |
./node_modules
./client/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: npm install
if: steps.cache.outputs.cache-hit != 'true'
run: |
make clean-npm
- name: npm test
run: |
npm test
- name: npm build
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './build/'
Release:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: Build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

create-failure-notifications:
needs: [ Release ]
uses: ./.github/workflows/create-gh-issue-and-slack-message.yml
if: ${{ failure() }}
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
call-terraform-release-pipeline:
uses: terraform-ibm-modules/common-pipeline-assets/.github/workflows/pages-release.yml@main
uses: ./pages-release.yml
secrets: inherit
permissions:
id-token: write
Expand Down

0 comments on commit ae27149

Please sign in to comment.