set backend and version env

This commit is contained in:
2022-05-02 19:20:44 +08:00
parent 93e18d2704
commit 9b2b8d71b5
4 changed files with 13 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
name: Deploy
name: Auto Deploy
on:
push:
@@ -16,11 +16,16 @@ jobs:
cache: 'yarn'
- name: "Install Dependencies"
run: yarn
- name: "Get current date"
id: "date"
run: echo "::set-output name=date::$(date --rfc-3339=date)"
- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn deploy -- -u "github-actions-bot <support+actions@github.com>"
yarn deploy -u "github-actions-bot <support+actions@github.com>" -m "$COMMIT_MESSAGE"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
REACT_APP_BACKEND: "https://t-hole.red/"
REACT_APP_BUILD_INFO: version-${{steps.date.outputs.date}}
COMMIT_MESSAGE: "Build for: ${{ github.event.head_commit.message }}"