Merge pull request #17 from newsguildny/solidarity-frame #17
Workflow file for this run
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: deploy website to production | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
pages: write # Grant Pages access | |
id-token: write # Necessary for the step that deploys to Github pages | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: deploying to guild-avatar.surge.sh | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm install -g surge | |
- run: make build | |
- run: surge public guild-avatar.surge.sh --token ${{ secrets.SURGE_TOKEN }} | |
# Upload artifact to github pages | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./public | |
# Deploy github pages | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build # This ensures the deploy step only runs after the build job succeeds | |
permissions: | |
pages: write | |
id-token: write | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |