Skip to content
name: Verify/Build/Deploy
on:
push:
branches: [main]
pull_request:
jobs:
job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "16"
- name: "Install"
run: npm ci
- name: depcheck
run: npm run depcheck
- name: Build
run: npm run build
# main needs to deploy to github pages because images point to github.io
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./academy
user_name: "Workflow"
user_email: "workflow@github"
- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
env:
HUBSPOT_TOKEN: ${{ secrets.HUBSPOT_TOKEN }}
HUBSPOT_CAMPAIGN_ID: ${{ secrets.HUBSPOT_CAMPAIGN_ID }}
run: npm run deploy