Skip to content

Commit

Permalink
Merge 082a999 into a4833bc
Browse files Browse the repository at this point in the history
  • Loading branch information
eeeqeee committed Mar 7, 2024
2 parents a4833bc + 082a999 commit 403ec0a
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ jobs:
run: |
if [[ -z "${{ steps.get-version.outputs.version }}" ]]; then
echo "msg=deploy: $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "title=Deploy $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "title-master=Release $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
else
echo "msg=deploy: version ${{ steps.get-version.outputs.version }} $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "title=Deploy version ${{ steps.get-version.outputs.version }} $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "title-master=Release version ${{ steps.get-version.outputs.version }} $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
fi
- name: Yarn install
run: |
Expand All @@ -56,19 +60,29 @@ jobs:
run: |
NX_URL_GITHUB_GO_CURRENT_VERSION="https://github.com/${{ github.repository }}/commit/$(git rev-parse HEAD)" \
yarn run nx run frontend:build-vite:production
- name: Deploy to Github Pages
- name: Try deploy to Github Pages
run: |
git fetch origin gh-pages --depth=1
git worktree add ../gh-pages gh-pages --no-checkout
cp -rT dist/apps/frontend ../gh-pages
cd ../gh-pages
git add --all .
git commit -m "${{ steps.get-commit-msg.outputs.msg }}"
git push
- name: Push
if ! git push origin; then
git push origin HEAD:actions/deploy-gh-pages --force
gh pr create --base gh-pages --head actions/deploy-gh-pages --title '${{ steps.get-commit-msg.outputs.title }}' --body ''
fi
env:
GH_TOKEN: ${{ github.token }}
- name: Try push
run: |
git status
git push
if ! git push origin; then
git push origin HEAD:actions/new-release --force
gh pr create --base $(git rev-parse --abbrev-ref HEAD) --head actions/new-release --title '${{ steps.get-commit-msg.outputs.title-master }}' --body ''
fi
env:
GH_TOKEN: ${{ github.token }}
- name: Make release
if: steps.get-version.outputs.version != ''
run: |
Expand Down

0 comments on commit 403ec0a

Please sign in to comment.