dockerhub #469
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
on: [push, workflow_dispatch] | |
jobs: | |
aws_cdk: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install | |
run: cd site && npm i | |
- name: Install Playwright browsers | |
run: cd site && npm exec playwright install | |
- name: Build | |
run: cd site && npm run build | |
# - name: Logseq Publish 🚩 | |
# uses: pengx17/[email protected] | |
# with: | |
# src: logseq | |
# dest: site/dist/graph | |
- name: Copy assets | |
run: cp -r logseq/assets site/dist/graph/ | |
- name: Install dependencies | |
uses: bahmutov/npm-install@v1 | |
with: | |
working-directory: ./infra/ | |
- name: Configure aws credentials | |
uses: aws-actions/configure-aws-credentials@master | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: 'us-east-1' | |
- name: Install | |
run: cd infra && npm i | |
- name: Build stack | |
run: cd infra && npm run build | |
- name: Synth stack | |
run: cd infra && npm run cdk synth | |
- name: Deploy stack | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
run: cd infra && npm run deploy | |
- name: Deploy dev | |
if: github.event_name == 'push' && github.ref != 'refs/heads/master' | |
run: cd infra && npm run deploy:dev | |
# - name: S3 Uploader for GitHub Actions | |
# if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
# uses: Noelware/[email protected] | |
# with: | |
# directories: 'site/dist/client' | |
# endpoint: https://s3.filebase.com | |
# bucket: briansunter | |
# access-key: ${{ secrets.FILEBASE_ACCESS_KEY }} | |
# secret-key: ${{ secrets.FILEBASE_SECRET_KEY }} | |
# - name: Pinata deploy action step | |
# id: deploy | |
# uses: anantaramdas/[email protected] | |
# with: | |
# pin-name: 'brian-sunter-site' | |
# path: 'site/public' | |
# pinata-api-key: ${{ secrets.IPFS_PINATA_DEPLOY_ACTION_API_KEY }} | |
# pinata-secret-api-key: ${{ secrets.IPFS_PINATA_DEPLOY_ACTION_API_SECRET_KEY }} | |
# verbose: true | |
# remove-old: false |