mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-18 09:22:53 +00:00
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
concurrency: ci-${{ github.ref }}
|
|
|
|
#env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
|
#BUNDLE_GEMFILE: ${{ github.workspace }}/ronn-ng/Gemfile
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Clone ronn-ng repository
|
|
uses: GuillaumeFalourd/[email protected]
|
|
with:
|
|
depth: 1
|
|
branch: 'main'
|
|
owner: 'andwati'
|
|
repository: 'ronn-ng'
|
|
|
|
- name: Install Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.2'
|
|
|
|
- name: Install dependencies
|
|
uses: awalsh128/cache-apt-pkgs-action@latest
|
|
with:
|
|
packages: rename
|
|
|
|
- name: Make HTML directory
|
|
run: mkdir public
|
|
|
|
- name: Build site files
|
|
run: |
|
|
cd ronn-ng
|
|
bundle install --with development
|
|
bundle exec bin/ronn \
|
|
--html \
|
|
--output-dir="../public/" \
|
|
--manual="General Commands Manual" \
|
|
--section=1 \
|
|
--name="andwati.github.io" \
|
|
../md/*.md
|
|
|
|
- name: Rename HTML files
|
|
run: rename 's/\.1//' public/*.html
|
|
|
|
# - name: Add CNAME file
|
|
# run: echo "danh.computer" > public/CNAME
|
|
|
|
- name: Deploy site
|
|
uses: s0/git-publish-subdir-action@develop
|
|
env:
|
|
REPO: self
|
|
BRANCH: www
|
|
FOLDER: public
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |