Build and deploy to Netlify #1208
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: Build and deploy to Netlify | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
working-directory: site | |
steps: | |
- name: Checkout c2pa | |
uses: actions/checkout@v3 | |
with: | |
repository: contentauth/c2pa-js | |
path: c2pa-js | |
- name: Checkout site | |
uses: actions/checkout@v3 | |
with: | |
path: site | |
- name: Install dependencies | |
run: npm install | |
- name: Build site | |
run: npm run build | |
- name: Deploy to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './site/build' | |
production-branch: main | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: 'Deploy from GitHub Actions' | |
alias: deploy-preview-${{ github.event.number }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 |