Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 27bb4d3

Browse files
author
Noah Hanjun Lee
authored
Add publish-docs workflow (#209)
1 parent b334dde commit 27bb4d3

File tree

3 files changed

+31
-22
lines changed

3 files changed

+31
-22
lines changed

.github/workflows/deploy-to-cloud.yaml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -135,25 +135,4 @@ jobs:
135135
description: Failed to deploy.
136136
state: "failure"
137137
token: "${{ github.token }}"
138-
139-
# Publish docs when it deploys to the production environment.
140-
publish-docs:
141-
runs-on: ubuntu-latest
142-
if: ${{ github.event.deployment.environment == 'production' }}
143-
steps:
144-
-
145-
uses: actions/checkout@v2
146-
-
147-
name: Create requirements.txt
148-
uses: "finnp/create-file-action@master"
149-
env:
150-
FILE_NAME: requirements.txt
151-
FILE_DATA: |
152-
pymdown-extensions==8.2
153-
-
154-
name: Publish docs
155-
uses: mhausenblas/mkdocs-deploy-gh-pages@master
156-
env:
157-
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
158-
CUSTOM_DOMAIN: docs.gitploy.io
159-
REQUIREMENTS: requirements.txt
138+

.github/workflows/publish-docs.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: publish-docs
2+
3+
on:
4+
deployment
5+
6+
jobs:
7+
publish-docs:
8+
runs-on: ubuntu-latest
9+
if: ${{ github.event.deployment.environment == 'docs' }}
10+
steps:
11+
-
12+
uses: actions/checkout@v2
13+
-
14+
name: Create requirements.txt
15+
uses: "finnp/create-file-action@master"
16+
env:
17+
FILE_NAME: requirements.txt
18+
FILE_DATA: |
19+
pymdown-extensions==8.2
20+
-
21+
name: Publish docs
22+
uses: mhausenblas/mkdocs-deploy-gh-pages@master
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
25+
CUSTOM_DOMAIN: docs.gitploy.io
26+
REQUIREMENTS: requirements.txt

deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ envs:
2727
reviewers:
2828
- hanjunlee
2929
- noah-qa
30+
31+
- name: docs
32+
auto_merge: false
33+
description: Publish the documentation of Gitploy.

0 commit comments

Comments
 (0)