Github - Use Node.js 20 for building #19
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: AutoDeploy to gh-pages | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: | |
- 20.x | |
steps: | |
- uses: actions/[email protected] | |
with: | |
branch: master | |
- name: 'Use Node.js ${{ matrix.node-version }}' | |
uses: actions/[email protected] | |
with: | |
node-version: '${{ matrix.node-version }}' | |
- name: 'Yarn install, test, build and deploy' | |
run: > | |
git config --global user.name "${{ secrets.GIT_AUTHOR_NAME }}" | |
git config --global user.email "${{ secrets.GIT_AUTHOR_EMAIL }}" | |
yarn install | |
yarn test | |
git clone -b gh-pages --single-branch https://${{ secrets.GITHUB_TOKEN }}@github.com/janbaer/howcani.git deploy | |
yarn deploy | |
env: | |
CI: true | |
- name: Push changes to branch gh-pages | |
uses: ad-m/[email protected] | |
with: | |
directory: /home/runner/work/howcani/howcani/deploy | |
github_token: '${{ secrets.GITHUB_TOKEN }}' | |
branch: gh-pages |