From a416d69c833cf69d5198bc5f4e35366ae12e07da Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Fri, 2 Feb 2024 01:36:11 +0900 Subject: [PATCH] ci: tweaked the CI scripts --- .github/workflows/build-listing.yml | 36 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-listing.yml b/.github/workflows/build-listing.yml index 45d20a5..464deb6 100644 --- a/.github/workflows/build-listing.yml +++ b/.github/workflows/build-listing.yml @@ -1,28 +1,27 @@ name: Build Repo Listing -on: +on: workflow_dispatch: push: - branches: main - paths: source.json + # branches: main + # paths: source.json # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write - + # Allow one concurrent deployment concurrency: - group: "pages" + group: pages cancel-in-progress: true - + env: listPublishDirectory: Website pathToCi: ci jobs: - build-listing: name: build-listing environment: @@ -30,35 +29,34 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - - uses: actions/checkout@v3 # check out this repo - - uses: actions/checkout@v3 # check out automation repo + - name: Check out the repository + uses: actions/checkout@v4 + - name: Check out the automation repository + uses: actions/checkout@v4 with: repository: vrchat-community/package-list-action path: ${{env.pathToCi}} clean: false # otherwise the local repo will no longer be checked out - - name: Restore Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ${{env.pathToCi}}/.nuke/temp ~/.nuget/packages key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }} - - name: Build Package Version Listing run: ${{env.pathToCi}}/build.cmd BuildMultiPackageListing --root ${{env.pathToCi}} --list-publish-directory $GITHUB_WORKSPACE/${{env.listPublishDirectory}} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Setup Pages - uses: actions/configure-pages@v3 - + uses: actions/configure-pages@v4 + with: + enablement: true + token: ${{ secrets.REPO_TOKEN }} - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: ${{env.listPublishDirectory}} - - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4