Skip to content

Commit

Permalink
Merge pull request #300 from open-pv/299-continous-deployment
Browse files Browse the repository at this point in the history
Continous deployment
  • Loading branch information
FlorianK13 authored Sep 16, 2024
2 parents ae52748 + 382b34e commit 8ba10f9
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: GitHub Pages
name: 👷‍♀️ Build website to deployment branch

on:
workflow_dispatch:
release:
types: [published]

jobs:
deployment:
runs-on: ubuntu-latest
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 👷 Deploy test site to github pages

on:
workflow_dispatch:
push:
branches:
- main

jobs:
deployment:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v3
- name: Install
run: npm ci
- name: Build and Deploy
env:
NODE_ENV: production
# This is set automatically by github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "Automated"
git config user.email "[email protected]"
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/open-pv/website.git
echo "User-agent: *" > public/robots.txt
echo "Disallow: /" >> public/robots.txt
npm run build
npm run deploy:test
29 changes: 29 additions & 0 deletions RELEASE-PROCEDURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Release Procedure

## Version Numbers

This software follows the [Semantic Versioning (SemVer)](https://semver.org/).<br>
It always has the format `MAJOR.MINOR.PATCH`, e.g. `1.5.0`.

## GitHub Release

### 1. 📝 Check correctness of test.openpv.de

- Navigate to test.openpv.de
- Check that this is the website you want to deploy
- Check that it has no bugs

### 2. 🐙 Create a `GitHub Release`

- Named `v0.12.1`
- Possibly add a Title to the Release Notes Headline
- Summarize key changes in the description
- Use the `generate release notes` button provided by GitHub
- Make sure that new contributors are mentioned
- Choose the correct git `tag`
- Choose the `main` branch
- Publish release

### 3. Deployment

- Start the manual deployment process based on the `build` branch
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"deploy": "gh-pages -d dist -b build"
"deploy": "gh-pages -d dist -b build",
"deploy:test": "gh-pages -d dist -b gh-pages"
},
"dependencies": {
"@chakra-ui/react": "^2.8.2",
Expand Down

0 comments on commit 8ba10f9

Please sign in to comment.