Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-linaro committed Oct 11, 2023
1 parent 7388c6c commit 408fe59
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PushAction

on:
push:
branches: [ main ]
workflow_dispatch:

# Cancel in-progress jobs or runs for the current workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
process-push:
runs-on: self-hosted
steps:
- name: Fetch git repository
uses: actions/checkout@v3
with:
path: website

- name: Build site
run: |
npm install --global yarn
yarn install
yarn build
- name: Check links
run: /srv/github-action-scripts/check-links.sh ${{ github.workspace }}/website/dist

- name: Make staging directory
run: mkdir -p /srv/s3-staging/${{ env.SITE_URL }}

- name: Sync build to staging directory
run: rsync -crui ${{ github.workspace }}/website/dist/ /srv/s3-staging/${{ env.SITE_URL }} --delete

- name: Upload to S3
run: /srv/github-action-scripts/upload-to-s3-root.sh

- name: Set up security headers
run: cd /srv/github-action-scripts && pipenv run python lambda-security-headers.py

- name: Invalidate CloudFront cache
run: /srv/github-action-scripts/invalidate-cloudfront.sh

0 comments on commit 408fe59

Please sign in to comment.