Add publish action #1
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: publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- run: | | |
- run: | | |
npm install | |
PUBLIC_URL=/mobile-screen-engagement-demo/ npm run build | |
# commit to gh-pages branch and push | |
git --work-tree build add --all | |
git commit -m "Automatic Deploy action run by github-actions" | |
git push origin HEAD:gh-pages --force |