Skip to content

Commit

Permalink
inline deployment and remove unnecessary step
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler committed Jan 30, 2024
1 parent 31f4a0e commit 26b5989
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ jobs:
run: bin/install_dependencies.sh

- name: Run the PDF compilation process
run: bin/build.sh

- name: Push to GitHub build branch
uses: JamesIves/[email protected]
with:
branch: build
folder: build
run: |
wget https://github.com/jgm/pandoc/releases/download/2.2.2.1/pandoc-2.2.2.1-1-amd64.deb -O /tmp/pandoc.deb
sudo dpkg -i /tmp/pandoc.deb
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -O /tmp/wkhtml.tar.xz
sudo tar -xf /tmp/wkhtml.tar.xz --strip-components=1 -C /usr/local
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -31,9 +29,11 @@ jobs:
aws-secret-access-key: ${{ secrets.CI_CD_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}

- name: Trigger website deployment
env:
DOCUMENTS_BUCKET: wca-documents
DISTRIBUTION_ID: E31ELE3W069ZX7
- name: Trigger S3 deployment
run: |
bin/deploy.sh
aws s3 sync build s3://wca-documents/ --acl public-read
# Update version file so the website will update its cache
git_hash=$(git rev-parse --short "$GITHUB_SHA")
echo "$git_hash" > version
aws s3 cp version s3://wca-documents/version
aws cloudfront create-invalidation --distribution-id E31ELE3W069ZX7 --paths "/*" --output text
8 changes: 0 additions & 8 deletions bin/deploy.sh

This file was deleted.

0 comments on commit 26b5989

Please sign in to comment.