feat: import from skland #803
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- 'src/**' | |
- 'public/**' | |
- 'package.json' | |
- 'vue.config.js' | |
- '.github/workflows/pages-deploy.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger deploy webhook | |
run: | | |
[ ! -z "${{ secrets.DEPLOY_WEBHOOK }}" ] && curl -X POST "${{ secrets.DEPLOY_WEBHOOK }}" || true | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile | |
- name: Lint | |
run: yarn run lint | |
- name: Build | |
run: yarn run build | |
env: | |
VUE_APP_SHA: ${{ github.sha }} | |
VUE_APP_HTTPS: ${{ secrets.HTTPS }} | |
VUE_APP_GTAG: ${{ secrets.GTAG }} | |
VUE_APP_CDN: ${{ secrets.CDN }} | |
VUE_APP_DATA_BASE_URL: ${{ secrets.DATA_BASE_URL }} | |
VUE_APP_MIGRATE_CONFIG: ${{ secrets.APP_MIGRATE_CONFIG }} | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './dist' | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |