This commit is contained in:
maxkey52
2026-02-28 22:41:45 +08:00
parent cb9fb1e9a1
commit 09dd23a4b3

31
pages.yaml Normal file
View File

@@ -0,0 +1,31 @@
name: Deploy Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set variables
id: vars
run: |
echo "USERNAME=${GITHUB_REPOSITORY_OWNER}" >> $GITHUB_OUTPUT
echo "REPO=${GITHUB_REPOSITORY#*/}" >> $GITHUB_OUTPUT
- name: Deploy to pages directory
run: |
USERNAME=${{ steps.vars.outputs.USERNAME }}
REPO=${{ steps.vars.outputs.REPO }}
TARGET=/data/pages/$USERNAME/$REPO
mkdir -p $TARGET
rm -rf $TARGET/*
cp -r ./* $TARGET/