Repository navigation
style: Adjust primary color and dark mode styling #60
This file contains hidden or 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
| name: "Docusaurus 🦖 GitHub Pages" | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - name: Check out repo | |
| uses: actions/checkout@v4 | |
| # Node is required for Bun | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| # Install Bun (matching what herolib uses) | |
| - name: Install Bun | |
| run: | | |
| curl -fsSL https://bun.sh/install | bash | |
| echo "BUN_INSTALL=$HOME/.bun/bin" >> $GITHUB_ENV | |
| echo "$HOME/.bun/bin" >> $GITHUB_PATH | |
| # Copy example files to template for demo build | |
| - name: Prepare demo site | |
| run: | | |
| cp -r example/cfg template/ | |
| cp -r example/docs template/ | |
| # Install and build Docusaurus website using Bun | |
| - name: Build Docusaurus website | |
| run: | | |
| cd template | |
| bun install | |
| bun run build | |
| - name: Set up SSH key | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.SSHKEY }}" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| eval $(ssh-agent -s) | |
| ssh-add ~/.ssh/id_rsa | |
| ssh-keyscan -H info.ourworld.tf >> ~/.ssh/known_hosts | |
| # Test SSH connection | |
| ssh -o StrictHostKeyChecking=no -T root@info.ourworld.tf || true | |
| - name: Deploy with rsync | |
| run: | | |
| rsync -avz -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa" ./template/build/ root@info.ourworld.tf:/root/hero/www/info/testdocs/ |