From 39cb42012236873cdf2d2c0616fa8fe3ed7e9298 Mon Sep 17 00:00:00 2001 From: BeautyyuYanli Date: Fri, 24 Mar 2023 23:44:08 +0800 Subject: [PATCH] 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> --- .github/workflows/deploy.yml | 30 ++++++++++++++++++++---------- README-zh_CN.md | 4 ++-- README.md | 4 ++-- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b824a3b..87bb174 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 \ No newline at end of file diff --git a/README-zh_CN.md b/README-zh_CN.md index 8b925c7..34c10e2 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -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) ### 在本地运行 diff --git a/README.md b/README.md index 1369ebd..638d5b2 100644 --- a/README.md +++ b/README.md @@ -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