Skip to content

ci: add permissions

ci: add permissions #6

Workflow file for this run

name: Test and Publish Cucumber Report
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Run tests and generate Cucumber report
run: npm test
- name: Generate Cucumber report
run: npm run generate:report
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: '.'
pattern: 'cucumber_report.html'
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v2
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}