Skip to content

Commit

Permalink
Let it out of the box
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Dec 4, 2022
1 parent 28d308e commit a3ea9f4
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions action.yml
Expand Up @@ -38,14 +38,28 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/cache@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Required by git-restore-mtime

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'

- name: Setup cache
uses: actions/cache@v3
if: ${{ inputs.cache == 'true' }}
with:
path: /tmp/sphinxnotes-pages
key: sphinxnotes-pages-${{ runner.os }}-${{ github.run_id }} # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
restore-keys: |
sphinxnotes-pages-${{ runner.os }}
- run: ${{ github.action_path }}/main.sh
- name: Build documentation
run: ${{ github.action_path }}/main.sh
shell: bash
env:
# See https://github.com/actions/runner/issues/665
Expand All @@ -55,3 +69,15 @@ runs:
INPUT_REPOSITORY_PATH: ${{ inputs.repository_path }}
INPUT_REQUIREMENTS_PATH: ${{ inputs.requirements_path }}
INPUT_SPHINX_VERSION: ${{ inputs.sphinx_version }}

- name: Setup Pages
uses: actions/configure-pages@v2

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: '.' # Upload entire repository

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit a3ea9f4

Please sign in to comment.