From 92efd89a56a584b92ca304339ed227db8ee9bce6 Mon Sep 17 00:00:00 2001 From: Kenshin0011 Date: Fri, 14 Jun 2024 23:52:14 +0900 Subject: [PATCH] =?UTF-8?q?url=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/static.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 77b7cf8..0ec77ad 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -9,6 +9,7 @@ jobs: build-and-deploy: runs-on: ubuntu-latest + uses: steps: - name: Checkout code uses: actions/checkout@v3 @@ -40,3 +41,17 @@ jobs: npm run deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get GitHub Pages URL + uses: actions/github-script@v6 + id: get-url + with: + script: | + const repo = context.repo.repo; + const owner = context.repo.owner; + const pages = await github.repos.getPages({ owner, repo }); + return pages.data.html_url; + + - name: Output GitHub Pages URL + run: | + echo "GitHub Pages URL: ${{ steps.get-url.outputs.result }}" \ No newline at end of file