From 2a045e61b704be8fdbe2294720797c9e4de26f24 Mon Sep 17 00:00:00 2001 From: Khalid Elshafie Date: Fri, 26 Jul 2024 16:33:12 +1000 Subject: [PATCH] ci: add deploy to github pages step --- .github/workflows/release.yml | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e108d8f..d8ff24d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,5 +17,11 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + - name: Deploy with gh-pages + run: | + git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git + npx gh-pages -d build -u "github-actions-bot " env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index cd32ca1..aefe5d2 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "bugs": { "url": "https://github.com/abolkog/js-playground/issues" }, - "homepage": "https://github.com/abolkog/js-playground", + "homepage": "https://abolkog.github.io/js-playground", "browserslist": { "production": [ ">0.2%",