Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deploy action for beta website #89

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and Deploy Beta Hugo Site with Nix

on:
push:
branches:
- beta

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code with submodules
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0

- name: Install Nix
run: |
curl -L https://nixos.org/nix/install | sh
source /home/runner/.nix-profile/etc/profile.d/nix.sh
mkdir -p /home/runner/.config/nix/
echo "experimental-features = nix-command flakes" >> /home/runner/.config/nix/nix.conf

- name: Build Hugo Site
run: |
source /home/runner/.nix-profile/etc/profile.d/nix.sh
nix develop --extra-experimental-features nix-command --command website

- name: Set directory permissions for FTP Deploy
run: |
chmod -R 755 result/

- name: Deploy to FTP server
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME_BETA }}
password: ${{ secrets.FTP_PASSWORD_BETA }}
local-dir: result/
server-dir: website/
state-name: ../.ftp-deploy-sync-state.json
protocol: ftps
security: strict
exclude: |
**/kaffeepause/**
**/scss/main.css
**/scss/main.css.map

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,5 @@ If the result folder is not accessible, try:
Even if required, these steps should only need to be used once, and may have just been a quirk of my (Alice) set up.


## CI/CD Pipelin
The website is built and deployed via GitHub Actions workflows. Therefore, any push to the main branch will trigger a rebuild of the website. Instead, please open a pull request for anything other than small content updates. If you are working on something larger than that, you can merge/push to the /beta branch, which will build and deploy to https://beta.rosenpass.eu where you can test your output before trying to merge into the main branch.
Loading