Skip to content

Commit b9c3a6a

Browse files
committed
Add deploy to gh-pages
1 parent 357ab35 commit b9c3a6a

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,35 @@ jobs:
2222
with:
2323
node-version: ${{ matrix.node-version }}
2424
- run: npm install
25-
- run: npm test
25+
- run: npm test
26+
DeployPages:
27+
runs-on: ubuntu-latest
28+
if: ${{ github.event_name == 'push' }}
29+
steps:
30+
- name: Checkout 🛎️
31+
uses: actions/[email protected] # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
32+
with:
33+
persist-credentials: false
34+
- name: Edit config
35+
run: >
36+
sed -i -E 's/^ "defaultProxy": ""/ "defaultProxy": "pproxy.rom1504.fr:443"/g' config.json
37+
- name: Build
38+
run: |
39+
npm install
40+
cp -R public/ ../
41+
git checkout -b gh-pages
42+
rm -Rf ./*
43+
rm -Rf .github .gitignore .gitpod .gitpod.DockerFile .npmignore .npmrc
44+
cp -R ../public/* ./
45+
- name: Create commits
46+
run: |
47+
git config user.name 'rom1504bot'
48+
git config user.email '[email protected]'
49+
git add --all
50+
git commit --amend -m "Update gh-pages"
51+
- name: Deploy 🚀
52+
uses: ad-m/github-push-action@master
53+
with:
54+
github_token: ${{ secrets.GITHUB_TOKEN }}
55+
branch: gh-pages
56+
force: true

0 commit comments

Comments
 (0)