Add GitHub Actions quick start guide #2
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: Deploy Documentation | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| jobs: | ||
| build-docs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.11' | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install mkdocs mkdocs-material pymdown-extensions | ||
| - name: Build documentation | ||
| run: | | ||
| mkdir -p docs/source | ||
| # Copy documentation files | ||
| cp README.md docs/source/index.md | ||
| cp FEATURES_SUMMARY.md docs/source/features.md | ||
| cp ADVANCED_FEATURES.md docs/source/advanced.md | ||
| cp QUICK_START_FEATURES.md docs/source/quickstart.md | ||
| cp COMMAND_REFERENCE.md docs/source/commands.md | ||
| # Create mkdocs.yml if it doesn't exist | ||
| if [ ! -f mkdocs.yml ]; then | ||
| cat > mkdocs.yml << 'EOF' | ||
| site_name: Distributed Task Queue | ||
| theme: | ||
| name: material | ||
| palette: | ||
| scheme: slate | ||
| primary: purple | ||
| accent: pink | ||
| nav: | ||
| - Home: index.md | ||
| - Features: features.md | ||
| - Quick Start: quickstart.md | ||
| - Advanced: advanced.md | ||
| - Commands: commands.md | ||
| EOF | ||
| fi | ||
| mkdocs build | ||
| - name: Deploy to GitHub Pages | ||
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: ./site | ||
| cname: distributed-task-queue.example.com | ||