Skip to content

Commit

Permalink
docs(website): add gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Jul 18, 2023
1 parent 29fc206 commit 376caf3
Show file tree
Hide file tree
Showing 9 changed files with 471 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# ignore repo directories and files
docs/
gh-pages-template/
scripts/
tools/
crowdin.yml
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/update-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: Build GH-Pages

on:
pull_request:
branches: [master, nightly]
types: [opened, synchronize, reopened]
push:
branches: [master]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
update_pages:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Checkout gh-pages
uses: actions/checkout@v3
with:
ref: gh-pages
path: gh-pages
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal token
fetch-depth: 0 # otherwise, will fail to push refs to dest repo

- name: Prepare gh-pages
run: |
# empty contents
rm -f -r ./gh-pages/*
# copy template back to pages
cp -f -r ./gh-pages-template/. ./gh-pages/
- name: Upload Artifacts
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3
with:
name: gh-pages
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
path: |
${{ github.workspace }}/gh-pages
!**/*.git
- name: Deploy to gh-pages
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch')
uses: actions-js/[email protected]
with:
github_token: ${{ secrets.GH_BOT_TOKEN }}
author_email: ${{ secrets.GH_BOT_EMAIL }}
author_name: ${{ secrets.GH_BOT_NAME }}
directory: gh-pages
branch: gh-pages
force: false
message: sync gh-pages to ${{ github.sha }}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
408 changes: 408 additions & 0 deletions gh-pages-template/index.html

Large diffs are not rendered by default.

0 comments on commit 376caf3

Please sign in to comment.