Skip to content

.github/workflows/pages.yml #131

.github/workflows/pages.yml

.github/workflows/pages.yml #131

Workflow file for this run

permissions:
contents: read
issues: read
pull-requests: read
pages: write
id-token: write
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- name: checkout Irssi
uses: actions/checkout@v3
with:
repository: irssi/irssi
fetch-depth: 0
path: irssi
- name: checkout sphinx theme
uses: actions/checkout@v3
with:
repository: ailin-nemui/furo
path: furo
- name: checkout Ascidia
uses: actions/checkout@v3
with:
repository: ailin-nemui/Ascidia
path: Ascidia
- uses: actions/setup-python@v4
- name: cache python
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- run: pip install -r sphinx/requirements.txt
- run: |
patch -d "$(python -c 'import sphinx.builders.html;print(sphinx.builders.html.__path__[0])')" -p4 < patches/9731.patch
- run: pip install ./furo
- run: |
echo "PERL5LIB=$(pwd)/local/lib/perl5${PERL5LIB+:}$PERL5LIB" >> $GITHUB_ENV
- name: check Perl ver
id: perl-ver
run: |
echo perl_version=$(perl -e'print $^V') >> $GITHUB_OUTPUT
- name: cache perl
uses: actions/cache@v3
with:
path: local
key: ${{ runner.os }}-${{ steps.perl-ver.outputs.perl_version }}-cpan-${{ hashFiles('**/cpanfile') }}
restore-keys: |
${{ runner.os }}-${{ steps.perl-ver.outputs.perl_version }}-cpan-
- name: cpm _tools
uses: perl-actions/install-with-cpm@stable
with:
cpanfile: _tools/cpanfile
global: false
sudo: false
- name: cache issues titles
uses: actions/cache@v3
with:
path: _tools/.issue_cache.sto
key: issue_cache-${{ github.run_number }}
restore-keys: |
issue_cache-
- run: perl _tools/issues_titles.pl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./sphinx.sh
- run: ./jekyll.sh -x
- uses: actions/jekyll-build-pages@v1
with:
source: jekyll
destination: jekyll/_site
future: true
- run: ./merge_pages.sh
- run: ./_tools/jekyll_index.sh -x
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: gh-pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4