build: rebased to upstream/master and ran npm install #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
- name: Build | |
run: | | |
npm ci | |
npx gulp bundle | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: arn:aws:iam::497147078732:role/ch-harmen-docs-deployer | |
aws-region: eu-central-1 | |
- name: Deploy to S3 | |
run: aws s3 sync build s3://${{ secrets.S3_BUCKET }} --delete | |
- name: Invalidate CloudFront distribution | |
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths '/*' | |
- name: Trigger ch-harmen-docs build | |
run: gh workflow run build.yml --repo harmenweber/ch-harmen-docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.TRIGGER_CH_HARMEN_DOCS_BUILD_TOKEN }} |