fix actions
This commit is contained in:
parent
bf4a321f22
commit
deb40ba5a9
2 changed files with 36 additions and 41 deletions
25
.github/workflows/main.yml
vendored
25
.github/workflows/main.yml
vendored
|
@ -1,6 +1,6 @@
|
||||||
# This is a basic workflow to help you get started with Actions
|
# This is a basic workflow to help you get started with Actions
|
||||||
|
|
||||||
name: Deploy Site
|
name: build-page-branch
|
||||||
|
|
||||||
# Controls when the workflow will run
|
# Controls when the workflow will run
|
||||||
on:
|
on:
|
||||||
|
@ -20,7 +20,8 @@ jobs:
|
||||||
build:
|
build:
|
||||||
# The type of runner that the job will run on
|
# The type of runner that the job will run on
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Use production environment specified in GitHub settings
|
||||||
|
environment: production
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
|
@ -28,23 +29,17 @@ jobs:
|
||||||
- uses: actions/setup-node@v3.0.0
|
- uses: actions/setup-node@v3.0.0
|
||||||
|
|
||||||
# Builds the react site for github pages
|
# Builds the react site for github pages
|
||||||
- name: Deploy GH Pages Site
|
- name: Build Static Pages
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name 'github-actions[bot]'
|
npm ci
|
||||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
npm run build
|
||||||
npm i
|
|
||||||
rm .gitignore
|
|
||||||
webpack
|
|
||||||
tsc
|
|
||||||
node build/index.js generate
|
|
||||||
rm build/index.js
|
|
||||||
rm build/public/template.html
|
|
||||||
mv CNAME build/public
|
|
||||||
mv build/public docs
|
mv build/public docs
|
||||||
echo "# DO NOT MANUALLY PUSH TO THIS BRANCH, ANY WORK DONE WILL BE ERASED. ITS WORK COMES FROM MASTER AND IT WILL BE REWRITTEN THE NEXT TIME AN ACTION OCCURS ON THE MASTER BRANCH" > README.md
|
echo "# DO NOT MANUALLY PUSH TO THIS BRANCH, ANY WORK DONE WILL BE ERASED. ITS WORK COMES FROM MASTER AND IT WILL BE REWRITTEN THE NEXT TIME AN ACTION OCCURS ON THE MASTER BRANCH" > README.md
|
||||||
|
- name: Push to Deployment Branch
|
||||||
|
run: |
|
||||||
git stash
|
git stash
|
||||||
git checkout -b page
|
git checkout -b page
|
||||||
git stash pop
|
git stash pop
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Generated React site"
|
git commit -m "Deploy Site"
|
||||||
git push --set-upstream origin page --force
|
git push origin page --force
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: Validation Testing
|
name: validate
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
Loading…
Reference in a new issue