-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into 1196-add-dose-to-me…
…dium-and-let-to-medium
- Loading branch information
Showing
11 changed files
with
1,122 additions
and
317 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,58 @@ | ||
name: Deploy documentation content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: [master] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Install dependencies for mkdocs | ||
run: poetry --directory docs install | ||
- name: Build site | ||
run: poetry --directory docs run mkdocs build | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact if on master | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: 'site' | ||
- name: Deploy to GitHub Pages if on master | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: Node.js CI | |
on: | ||
push: | ||
branches: [master] | ||
tags: ['v*'] | ||
pull_request: | ||
branches: [master] | ||
|
||
|
@@ -54,7 +55,7 @@ jobs: | |
deploy-to-github-registry: | ||
needs: [build_and_test] | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
if: github.ref == 'refs/heads/master' | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }}-web | ||
|
@@ -72,24 +73,24 @@ jobs: | |
submodules: true | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4.6.0 | ||
uses: docker/metadata-action@v5.0.0 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
# see https://github.com/docker/build-push-action/issues/513#issuecomment-987951050 | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
|
@@ -105,7 +106,6 @@ jobs: | |
deploy_gh_pages: | ||
runs-on: ubuntu-latest | ||
needs: [build_and_test] | ||
if: github.ref == 'refs/heads/master' | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
@@ -125,13 +125,29 @@ jobs: | |
node-version: '18.x' | ||
cache: 'npm' | ||
|
||
- name: webfactory/ssh-agent 🖥️ | ||
- name: webfactory/ssh-agent for dev 🖥️ | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
uses: webfactory/[email protected] | ||
with: | ||
# Private SSH key to register in the SSH agent | ||
ssh-private-key: ${{ secrets.WEBDEV }} | ||
|
||
- name: Deploy 🚀 | ||
- name: Deploy to dev instance 🚀 | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
run: | | ||
git remote set-url origin [email protected]:yaptide/web_dev.git | ||
npm run deploy -- -u "github-actions-bot <[email protected]>" -r "[email protected]:yaptide/web_dev.git" | ||
- name: webfactory/ssh-agent for production 🖥️ | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | ||
uses: webfactory/[email protected] | ||
with: | ||
# Private SSH key to register in the SSH agent | ||
ssh-private-key: ${{ secrets.WEBPROD }} | ||
|
||
- name: Deploy to prod instance 🚀 | ||
# this action is being triggered on release tags (named v*) | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | ||
run: | | ||
git remote set-url origin [email protected]:yaptide/yaptide.github.io.git | ||
npm run deploy -- -u "github-actions-bot <[email protected]>" -r "[email protected]:yaptide/yaptide.github.io.git" |
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 @@ | ||
# Technical documentation of the project |
Oops, something went wrong.