Skip to content

release: v4.3.0

release: v4.3.0 #374

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Deploy
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache pnpm modules
uses: actions/cache@v4
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/[email protected]
with:
version: 8.x.x
run_install: true
- run: |
export NODE_OPTIONS=--max-old-space-size=32768
pnpm run build
- run: echo '22333322.xyz' > dist/CNAME
- name: Prepare tag
id: prepare_tag
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG_NAME="${GITHUB_REF##refs/tags/}"
echo "::set-output name=tag_name::${TAG_NAME}"
echo "::set-output name=deploy_tag_name::page_${TAG_NAME}"
- name: Archive Version Tag
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
tag_message: 'Store ${{ steps.prepare_tag.outputs.tag_name }}'
force_orphan: true
env:
CI: true
# VITE_APP_PUBLIC_URL: ${{ secrets.VITE_APP_PUBLIC_URL }}
VITE_APP_PUBLIC_URL: https://fastly.jsdelivr.net/gh/mx-space/mx-admin@gh-pages/