mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
Fix deploy workflow (#1016)
* fixing the automated web deploys * adding the action version numbers
This commit is contained in:
parent
5939d590e3
commit
c198ec32bb
40
.github/workflows/deploy.yml
vendored
40
.github/workflows/deploy.yml
vendored
@ -19,12 +19,7 @@ jobs:
|
|||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
with:
|
with:
|
||||||
ref: rc
|
ref: gh-pages
|
||||||
|
|
||||||
- name: Install and Build
|
|
||||||
run: |
|
|
||||||
npm install
|
|
||||||
npm run dist
|
|
||||||
|
|
||||||
- name: Get release version
|
- name: Get release version
|
||||||
id: release-version
|
id: release-version
|
||||||
@ -35,12 +30,41 @@ jobs:
|
|||||||
echo "::set-output name=version::${{ github.event.inputs.release_version }}"
|
echo "::set-output name=version::${{ github.event.inputs.release_version }}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Create deploy branch
|
||||||
|
run: |
|
||||||
|
git switch -c deploy-${{ steps.release-version.outputs.version }}
|
||||||
|
git push -u origin deploy-${{ steps.release-version.outputs.version }}
|
||||||
|
|
||||||
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
with:
|
||||||
|
ref: rc
|
||||||
|
|
||||||
|
- name: setup git config
|
||||||
|
run: |
|
||||||
|
git config user.name = "GitHub Action Bot"
|
||||||
|
git config user.email = "<>"
|
||||||
|
|
||||||
|
- name: Install and Build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run dist
|
||||||
|
|
||||||
- name: Deploy GitHub Pages
|
- name: Deploy GitHub Pages
|
||||||
uses: crazy-max/ghaction-github-pages@db4476a01402e1a7ce05f41832040eef16d14925 # v2.5.0
|
uses: crazy-max/ghaction-github-pages@db4476a01402e1a7ce05f41832040eef16d14925 # v2.5.0
|
||||||
with:
|
with:
|
||||||
target_branch: gh-pages
|
target_branch: deploy-${{ steps.release-version.outputs.version }}
|
||||||
build_dir: build
|
build_dir: build
|
||||||
keep_history: true
|
keep_history: true
|
||||||
commit_message: "Deploying ${{ steps.release-version.outputs.version }}"
|
commit_message: "Staging deploy ${{ steps.release-version.outputs.version }}"
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create Deploy PR
|
||||||
|
run: |
|
||||||
|
gh pr create --title "Deploy $VERSION" --body "Deploying $VERSION" --base gh-pages --head "$PR_BRANCH"
|
||||||
|
env:
|
||||||
|
VERSION: ${{ steps.release-version.outputs.version }}
|
||||||
|
PR_BRANCH: deploy-${{ steps.release-version.outputs.version }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user