generated from maxkey52/web_template
31 lines
653 B
YAML
31 lines
653 B
YAML
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/ |