From 1c630ef65f5bd3cfba406ee931d9522267a1fcd8 Mon Sep 17 00:00:00 2001 From: Zilong Yao <59038614+ZLY201@users.noreply.github.com> Date: Mon, 30 Oct 2023 01:05:33 +0800 Subject: [PATCH 1/2] chore: move gh-pages to new repo (#16) * chore: move gh-pages to new repo * chore: update pull request template --- .github/PULL_REQUEST_TEMPLATE.md | 1 + .github/workflows/codeql-analysis.yml | 1 + .github/workflows/compressed-size.yml | 1 + .github/workflows/deploy.yml | 10 ++++++++++ .github/workflows/lint.yml | 1 + 5 files changed, 14 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6eaae89..503b01e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -24,6 +24,7 @@ If yes, please describe the impact and migration path for existing applications: **The PR fulfills these requirements:** +- [ ] It's submitted to the `dev` branch, **not** the `main` branch - [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number) If adding a **new feature**, the PR's description includes: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 59cb71d..b653da4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,6 +19,7 @@ on: - src/** - rspack.config.ts branches: + - dev - main schedule: - cron: '28 17 * * 5' diff --git a/.github/workflows/compressed-size.yml b/.github/workflows/compressed-size.yml index 2b02b6c..d3340d5 100644 --- a/.github/workflows/compressed-size.yml +++ b/.github/workflows/compressed-size.yml @@ -11,6 +11,7 @@ on: - package.json - yarn.lock branches: + - dev - main concurrency: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4a4437c..388282e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,6 +11,7 @@ on: - package.json - yarn.lock branches: + - dev - main jobs: @@ -24,7 +25,16 @@ jobs: - name: Build run: yarn build - name: Deploy to github pages + if: ${{ github.ref == 'refs/heads/dev' }} uses: JamesIves/github-pages-deploy-action@v4 with: folder: dist branch: gh-pages + repository-name: typescript-tutorial-exercises/preview + - name: Deploy to github pages + if: ${{ github.ref == 'refs/heads/main' }} + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist + branch: gh-pages + repository-name: typescript-tutorial-exercises/typescript-tutorial-exercises.github.io diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 903f563..dbabedc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,6 +3,7 @@ name: lint-code on: pull_request: branches: + - dev - main concurrency: From d6241f800da33ce4c8d4863e32af494d06355318 Mon Sep 17 00:00:00 2001 From: Zilong Yao <59038614+ZLY201@users.noreply.github.com> Date: Mon, 30 Oct 2023 01:13:13 +0800 Subject: [PATCH 2/2] chore: add workflow_dispatch for deploy (#17) --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 388282e..6b18a00 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,7 @@ name: deploy on: + workflow_dispatch: push: paths: - config/**