Skip to content

publish

publish #1795

Workflow file for this run

# Based on https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml
name: publish
on:
push:
branches:
- main
schedule:
# Optimize for Indian working hours
# Runs at 8:09 UTC = 13:39 IST
# Runs at 12:09 UTC = 17:39 IST
- cron: '09 8,12 * * *'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: php generate.php
name: Set current Year
# WIP
# - name: Install curl-impersonate deps
# run: apt-get install --yes libnss3 nss-plugin-pem ca-certificates
# - name: Download libcurl-impersonate
# run: wget "https://github.com/lwthiker/curl-impersonate/releases/download/v0.5.4/libcurl-impersonate-v0.5.4.x86_64-linux-gnu.tar.gz" && \
# tar -xvf libcurl-impersonate-v0.5.4.x86_64-linux-gnu.tar.gz
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
bundler-cache: true
- name: Generate RSS Feeds
run: bundle exec weneedfeed build --base-url="https://captnemo.in/npci-rss-feeds"
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@64bcae551a7b18bcb9a09042ddf1960979799187 # v1.0.8
with:
path: "output/"
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@ee48c7b82e077d7b8ef30b50a719e6a792a50c9a # v2.0.2