fix(website): cname not being added on publish #50
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 to Github Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Deploy Website | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Clone Hero | |
run: | | |
git clone -n --recurse-submodules https://github.com/ulixee/hero.git | |
cd hero | |
(git fetch --depth 1 origin $GITHUB_REF_NAME && git checkout $GITHUB_REF_NAME) || (git fetch --depth 1 origin main && git checkout main) | |
git submodule update --init --recursive --depth 1 | |
working-directory: .. | |
- name: Create Node Environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'yarn' | |
- name: Install Packages and Build Website | |
run: | | |
cd website | |
yarn install | |
yarn build | |
cp dist/index.html dist/404.html | |
- name: Add Website cname | |
run: echo "ulixee.org" > website/dist/CNAME | |
- name: Deploy | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: gh-pages | |
FOLDER: website/dist | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |