Skip to content

build and publish using GitHub Pages #517

build and publish using GitHub Pages

build and publish using GitHub Pages #517

name: build and publish using GitHub Pages
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
schedule:
# every day at 2:40
- cron: '40 2 * * *'
jobs:
build:
name: build GTFS-Flex feed
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v5
- name: install qsv
run: ./ci/install-qsv.sh
- run: ./build.sh
- run: |
mkdir gh-pages
cp index.html vbb-flex.gtfs.zip gh-pages/
- name: store GTFS-Flex feed as GitHub Pages artifact
if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main' }}
uses: actions/upload-pages-artifact@v4
with:
name: feed
path: gh-pages/
publish:
name: publish GTFS-Flex feed using GitHub Pages
if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main' }}
needs: [build]
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: deploy GTFS-Flex feed to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: feed