Skip to content

Update countdowns

Update countdowns #416

name: Deploy to GitHub Pages
on:
push:
branches:
- main
paths:
- .github/workflows/gh-pages-deploy.yaml
- frontend/**
jobs:
gh-pages-deploy:
name: Deploying to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Install packages
run: |
cd frontend
npm install
cd ..
- name: Generate build number and date
run: |
APP_BUILD_NUM=$GITHUB_RUN_NUMBER.$GITHUB_SHA
APP_BUILD_DATE=`date`
cat << EOF > frontend/.env.production
VUE_APP_BUILD_NUM=$APP_BUILD_NUM
VUE_APP_BUILD_DATE=$APP_BUILD_DATE
VUE_APP_BACKEND_API_URI=https://api.xivtodo.com
VUE_APP_DISCORD_CLIENT_ID=933567168912719923
VUE_APP_DISCORD_REDIRECT_URI=https://xivtodo.com/auth
EOF
- name: Build and deploy to gh-pages
run: |
git checkout --orphan gh-pages-test
cd frontend
npm run build
paths=(
"profile"
"encounters"
"questlines"
"challenges"
"checklist"
"settings"
"help"
"privacy"
)
for path in ${paths[@]}; do
mkdir -p dist/$path
cp dist/index.html dist/$path/index.html
done
git --work-tree dist add --all
git --work-tree dist commit -m "Automated dist build"
git push origin HEAD:gh-pages --force