Skip to content

[non-related] ci: test1 #1

[non-related] ci: test1

[non-related] ci: test1 #1

Workflow file for this run

name: Deploy to Github Pages
on:
push:
branches: [ main, opt/ci ]
jobs:
setup:
name: Setup Project Info
runs-on: ubuntu-latest
outputs:
DIST_NAME: ${{ steps.get-info.outputs.DIST_SUFFIX }}
steps:
- name: 🧐 Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: 📙 Get Build Information
id: get-info
run: |
COMMIT_COUNT=$(git rev-list --count HEAD)
BUILD_DATE=$(date "+%y%m%d")
HEAD_SHA=$(git rev-parse --short HEAD)
echo "DIST_NAME=dist-${COMMIT_COUNT}-${BUILD_DATE}-${HEAD_SHA}" >> $GITHUB_OUTPUT
main:
name: Deploy to Github Pages
needs: setup
env:
DIST_NAME: ${{ needs.setup.outputs.DIST_NAME }}
runs-on: ubuntu-latest
steps:
- name: 🔨 Build Production Pages
id: build
uses: ./.github/workflows/build.yml
- name: 📦 Download from Artifacts
id: download
uses: actions/download-artifact@v4
with:
name: ${{ env.DIST_NAME }}
path: dist
- name: 🚀 Deploy to Github Pages
id: deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: gh-pages
token: ${{ secrets.DEPLOY_TOKEN }}