Skip to content

checkout v3

checkout v3 #99

Workflow file for this run

name: Deploy to GH Pages
on:
push:
branches:
- master
repository_dispatch:
types: [wordpress]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# do not persist-credentials to allow git push to another repo
persist-credentials: 'false'
- name: Install deps
run: npm install
- name: Build
run: npm run build
- name: Deploy
# subtree instructions from https://gist.github.com/tduarte/eac064b4778711b116bb827f8c9bef7b
run: |
git config --global user.name $GITHUB_ACTOR
git config --global user.email "[email protected]"
git add -f dist
git commit --no-verify -m "Update from commit tnguyen14/tridnguyen.com@$GITHUB_SHA"
git subtree split --prefix dist -b gh-pages
git remote add gh-pages https://x-access-token:${{ secrets.GH_PAGES_TOKEN }}@github.com/tnguyen14/tnguyen14.github.io.git
git push -f gh-pages gh-pages:master