mirror of
https://github.com/IT4Change/boilerplate-e2e-cypress-cucumber.git
synced 2025-12-13 04:55:50 +00:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: e2e:deploy:docs to github
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
files-changed:
|
|
name: Detect File Changes
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
changes: ${{ steps.changes.outputs.e2e-docs }}
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Check for e2e docs file changes
|
|
uses: dorny/paths-filter@v3.0.2
|
|
id: changes
|
|
with:
|
|
token: ${{ github.token }}
|
|
filters: .github/file-filters.yml
|
|
list-files: shell
|
|
|
|
build-and-deploy:
|
|
if: needs.files-changed.outputs.changes == 'true'
|
|
name: Deploy Docs - E2E Testing
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@master
|
|
|
|
- name: Set Node version
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 21
|
|
cache: npm
|
|
|
|
# run build script
|
|
- name: Build Docs
|
|
run: npm run docs:build
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: crazy-max/ghaction-github-pages@v4
|
|
with:
|
|
target_branch: gh-pages
|
|
build_dir: build/docs/
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|