Deploy #1811
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 | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '30 0 * * *' | |
jobs: | |
deploy: | |
name: "Deploy website" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: dcodeIO/setup-node-nvm@master | |
with: | |
node-version: 16 | |
- name: Build | |
run: | | |
npm ci --no-audit | |
node scripts/update-data | |
node scripts/update-svgs | |
npm run build | |
node scripts/update-sdk | |
- name: Deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cd dist | |
echo www.assemblyscript.org > CNAME | |
git init -b pages | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
git add -A | |
git commit -m 'deploy' | |
git push -f https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git pages:gh-pages |