From 05197d71b186b41b848b12fe56dbb5dd7f892098 Mon Sep 17 00:00:00 2001 From: papapatrick <109422393+Patrickill@users.noreply.github.com> Date: Tue, 6 Feb 2024 21:52:00 +0800 Subject: [PATCH 1/5] ci: add Azure Static Web Apps workflow file on-behalf-of: @Azure opensource@microsoft.com --- ...static-web-apps-polite-stone-02932fc10.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml diff --git a/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml b/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml new file mode 100644 index 0000000..2bf838f --- /dev/null +++ b/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - main + +jobs: + build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_STONE_02932FC10 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "/" # App source code path + api_location: "" # Api source code path - optional + output_location: "dist" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_STONE_02932FC10 }} + action: "close" From eed32b12c9838ee7e6118caa2be9c0e346bdb630 Mon Sep 17 00:00:00 2001 From: papapatrick <109422393+Patrickill@users.noreply.github.com> Date: Tue, 6 Feb 2024 22:09:46 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix(action):=E4=BF=AE=E5=A4=8Daction?= =?UTF-8?q?=E9=83=A8=E7=BD=B2node=E7=89=88=E6=9C=AC=E8=BF=87=E4=BD=8E?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/azure-static-web-apps-polite-stone-02932fc10.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml b/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml index 2bf838f..333e6a9 100644 --- a/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml +++ b/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml @@ -23,6 +23,7 @@ jobs: id: builddeploy uses: Azure/static-web-apps-deploy@v1 with: + node-version: '20.9.0' azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_STONE_02932FC10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) action: "upload" From 3d6eff9cb830fdc625bfd6c317a2d5eae7dde02d Mon Sep 17 00:00:00 2001 From: papapatrick <109422393+Patrickill@users.noreply.github.com> Date: Tue, 6 Feb 2024 22:29:38 +0800 Subject: [PATCH 3/5] Update azure-static-web-apps-polite-stone-02932fc10.yml --- ...re-static-web-apps-polite-stone-02932fc10.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml b/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml index 333e6a9..5511fb9 100644 --- a/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml +++ b/.github/workflows/azure-static-web-apps-polite-stone-02932fc10.yml @@ -19,20 +19,20 @@ jobs: with: submodules: true lfs: false + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.9.0' - name: Build And Deploy id: builddeploy uses: Azure/static-web-apps-deploy@v1 with: - node-version: '20.9.0' azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_STONE_02932FC10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + repo_token: ${{ secrets.GITHUB_TOKEN }} action: "upload" - ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### - # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig - app_location: "/" # App source code path - api_location: "" # Api source code path - optional - output_location: "dist" # Built app content directory - optional - ###### End of Repository/Build Configurations ###### + app_location: "/" + api_location: "" + output_location: "dist" close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' From 41a826ef84312ce808c03e3ba9afbee78b3bba38 Mon Sep 17 00:00:00 2001 From: papapatrick <109422393+Patrickill@users.noreply.github.com> Date: Tue, 6 Feb 2024 22:35:34 +0800 Subject: [PATCH 4/5] Update package.json --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index bf32f4a..abfba9c 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,9 @@ "build": "astro build", "preview": "astro preview", "astro": "astro" + }, + "engines": { + "node": ">=18.0.0" }, "dependencies": { "@astrojs/mdx": "^1.1.5", From fdaa93f712555c4e163e4cbab38a70934c8c958a Mon Sep 17 00:00:00 2001 From: papapatrick <109422393+Patrickill@users.noreply.github.com> Date: Thu, 22 Feb 2024 20:58:05 +0800 Subject: [PATCH 5/5] =?UTF-8?q?doc(README.md):=E6=B7=BB=E5=8A=A0=E5=9F=9F?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 636b93f..53e3b3c 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -一个astro构建的个人博客 \ No newline at end of file +一个astro构建的个人博客 + +www.papapatrick.tech