This repository has been archived by the owner on Aug 25, 2023. It is now read-only.
Publish #165
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: Publish | |
# Run every Sunday @ 03:00 UTC => 20:00 PST | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * 0' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
# Get the code | |
- uses: actions/checkout@v2 | |
with: | |
ref: master | |
# Install dependencies | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.13.1' | |
- name: Install Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.74.3' | |
- name: Install go-html-asset-manager | |
run: | | |
go get -u github.com/gauntface/go-html-asset-manager/cmds/htmlassets/ | |
go get -u github.com/gauntface/go-html-asset-manager/cmds/genimgs/ | |
- name: Install NPM Deps | |
run: npm install | |
# Build it | |
- name: Build | |
run: npm run build | |
env: | |
VIMEO_TOKEN: ${{ secrets.VIMEO_TOKEN }} | |
# Deploy to AWS | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-1 | |
- name: Publish to AWS | |
run: npx --package @gauntface/cli gauntface aws s3 deploy-static-site --directory="./public/" --bucket_name="web-push-book.gauntface.com" | |
shell: bash |