use official github-pages deploy workflow (#104)

* use official github-pages deploy workflow

fix

fix2

* Update README.md

* update readme

---------

Co-authored-by: Jing Hua <59118459+ztjhz@users.noreply.github.com>
This commit is contained in:
BeautyyuYanli 2023-03-24 23:44:08 +08:00 committed by GitHub
parent 1952b451ab
commit 39cb420122
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 14 deletions

View file

@ -5,12 +5,21 @@ on:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
name: Deploy to GitHub Pages
build:
runs-on: ubuntu-latest
permissions:
contents: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
@ -25,10 +34,11 @@ jobs:
- name: Build website
run: yarn build
- name: deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

View file

@ -125,8 +125,8 @@ Free ChatGPT 已经包含了大量的功能。您可以使用以下功能:
![image](https://user-images.githubusercontent.com/59118459/223753340-1270e038-d213-4d6f-938c-66a30dad7c88.png)
1. 现在,转到 `Settings` 选项卡
![image](https://user-images.githubusercontent.com/59118459/223753577-9b6f8266-26e8-471b-8f45-a1a02fbab232.png)
1. 在左侧边栏中,单击 `Pages` ,在右侧区域中,为 `Source` 选择 `Deploy from a branch`,为 `Branch` 选择 `gh-pages`。然后在顶部部分,可以看到 "Your site is live at `XXX`"。
![image](https://user-images.githubusercontent.com/59118459/223753724-89f6452e-a441-48b8-8665-7a5e515d2a57.png)
1. 在左侧边栏中,单击 `Pages` ,在右侧区域中,为 `Source` 选择 `GitHub Actions`。然后在顶部部分,您可以看到 "Your site is live at `XXX`"。
![image](https://user-images.githubusercontent.com/59118459/227568881-d8fb7baa-f890-4dee-8fc2-b6b429ba2098.png)
### 在本地运行

View file

@ -132,8 +132,8 @@ If you'd like to run your own instance of Free ChatGPT, you can easily do so by
![image](https://user-images.githubusercontent.com/59118459/223753340-1270e038-d213-4d6f-938c-66a30dad7c88.png)
1. Now, navigate to the `Settings` tab
![image](https://user-images.githubusercontent.com/59118459/223753577-9b6f8266-26e8-471b-8f45-a1a02fbab232.png)
1. In the left sidebar, click on `Pages` and in the right section, select `Deploy from a branch` for `Source` and `gh-pages` for `Branch`. Then at the top section, you can see that "Your site is live at `XXX`".
![image](https://user-images.githubusercontent.com/59118459/223753724-89f6452e-a441-48b8-8665-7a5e515d2a57.png)
1. In the left sidebar, click on `Pages` and in the right section, select `GitHub Actions` for `source`. Then at the top section, you can see that "Your site is live at `XXX`".
![image](https://user-images.githubusercontent.com/59118459/227568881-d8fb7baa-f890-4dee-8fc2-b6b429ba2098.png)
### Running it locally