Skip to content

Commit 103d574

Browse files
authored
docs: Add workflow to publish GitHub pages (#2299)
## Description This PR adds additional workflow to publish landing page on GitHub pages whenever there's a change on main inside the `docs` directory. ## Changes - Added workflow for publishing landing page - Added .nojekyll file ## Checklist - [x] Ensured that CI passes
1 parent 23770ad commit 103d574

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/docs-check.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish Screens landing page
2+
env:
3+
YARN_ENABLE_HARDENED_MODE: 0
4+
on:
5+
push:
6+
branches:
7+
- main
8+
paths: docs/**
9+
workflow_dispatch:
10+
11+
jobs:
12+
publish:
13+
if: github.repository == 'software-mansion/react-native-screens'
14+
runs-on: ubuntu-latest
15+
concurrency:
16+
group: docs-check-${{ github.ref }}
17+
cancel-in-progress: true
18+
steps:
19+
- name: Check out
20+
uses: actions/checkout@v4
21+
22+
- name: Generate landing page content
23+
run: >-
24+
git config --local user.email "[email protected]"
25+
&& git config --local user.name "GitHub Action"
26+
&& cd docs
27+
&& yarn
28+
&& yarn build
29+
30+
- name: Publish generated content to GitHub Pages
31+
uses: JamesIves/github-pages-deploy-action@releases/v3
32+
with:
33+
FOLDER: docs/build
34+
BRANCH: gh-pages
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/static/.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)