forked from phoenixframework/phoenix_live_view
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from SteffenDE/sd-actions-docs
push docs to github pages
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
elixir: 1.18.1 | ||
otp: 27.2 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ env.elixir }} | ||
otp-version: ${{ env.otp }} | ||
|
||
- name: Restore deps and _build cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-${{ hashFiles('**/mix.lock') }}-docs | ||
restore-keys: | | ||
${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}- | ||
- name: Install Dependencies | ||
run: mix deps.get --only docs | ||
|
||
- name: Build docs | ||
run: mix docs | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: doc/ | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{steps.deployment.outputs.page_url}} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |