Skip to content

Commit

Permalink
Deploy docs to GitHub pages instead of self-hosted server (#473)
Browse files Browse the repository at this point in the history
* Deploy docs to GitHub pages instead of self-hosted server

Having the documentation hosted on GitHub is more reliable than using a
custom deployment to a self-managed server.

* downgrade node version

* Update websites package dependencies

* Add permissions

* Only deploy website on main branch
  • Loading branch information
markuspoerschke authored Dec 22, 2022
1 parent bae8492 commit f518cf3
Show file tree
Hide file tree
Showing 6 changed files with 3,214 additions and 4,552 deletions.
41 changes: 28 additions & 13 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,39 @@ on:
paths:
- ".github/workflows/website.yml"
- "website/**"
- "Dockerfile"
branches:
- 2.x

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: website
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Turnstyle
timeout-minutes: 18
uses: softprops/turnstyle@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dokku Deployment
uses: vitalyliber/dokku-github-action@master
env:
PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }}
HOST: ical.poerschke.nrw
PROJECT: ical

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

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Build Website
run: "make docs"

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'website/build'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
17
13 changes: 0 additions & 13 deletions Dockerfile

This file was deleted.

24 changes: 0 additions & 24 deletions website/default.nginx

This file was deleted.

4 changes: 2 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.3",
"@docusaurus/preset-classic": "2.0.0-beta.3",
"@docusaurus/core": "^2.0.0",
"@docusaurus/preset-classic": "^2.0.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"docusaurus-plugin-ackee": "^0.0.0",
Expand Down
Loading

0 comments on commit f518cf3

Please sign in to comment.