From 3909fe83da32742fe7525ec04f1fc9d4f9ca5df7 Mon Sep 17 00:00:00 2001 From: CzBiX Date: Fri, 2 Oct 2020 18:18:45 +0800 Subject: [PATCH] Publish to Github pages --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf2ebdd..864feb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,7 @@ jobs: - run: echo ::set-env name=RELEASE_DATE::$(date +'%Y%m%d') - run: echo ::set-env name=GIT_TAG::nightly-$RELEASE_DATE - run: echo ::set-env name=RELEASE_FILE::qb-web-$GIT_TAG.zip + - name: Pack Release run: | yarn run build @@ -49,6 +50,19 @@ jobs: cp dist/public/{index,login}.html cp INSTALL.md dist zip -r $RELEASE_FILE dist + + - name: Publish + run: | + cd dist/public + git init + git config user.name ${{ github.actor }} + git config user.email ${{ github.actor }}@users.noreply.github.com + git remote add origin https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git + git checkout -b gh-pages + git add --all + git commit -m "Publish" + git push origin gh-pages -f + - name: Add tag run: | git tag $GIT_TAG