deploy #325
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 Github Pages | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: git submodule update --init --remote --recursive | |
- name: Setup node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Build and Deploy | |
run: | | |
npm ci | |
npm run build | |
cd dist | |
cp index.html 404.html | |
echo "cf-tracker.tech" > CNAME | |
git config --global user.name "Github Actions Bot" | |
git config --global user.email "<>" | |
git config --global init.defaultBranch main | |
git init . | |
git add -A | |
git commit -m 'new build' | |
git push -f https://geekypandey:${{secrets.GITHUB_TOKEN}}@github.com/geekypandey/cf_tracker.git main:gh-pages |