Skip to content

Commit

Permalink
Deploy website to S3 using GitHub Actions
Browse files Browse the repository at this point in the history
AWS permissions needed are referenced here:
jakejarvis/s3-sync-action#10 (comment)
  • Loading branch information
bwbaugh committed Dec 28, 2019
1 parent eaefffe commit 4774f0c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy_website.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy website

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Deploy to S3
uses: jakejarvis/s3-sync-action@v0.5.0
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-2'
SOURCE_DIR: 'public'
- name: Set output variables
id: vars
run: |
echo ::set-output name=git_tag_production::"production-$(date -u '+%Y%m%dT%H%M%SZ')"
- name: Push production tag
uses: anothrNick/github-tag-action@1.8.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: ${{ steps.vars.outputs.git_tag_production }}

0 comments on commit 4774f0c

Please sign in to comment.