This document outlines the automated deployment process for the Flash API Documentation site.
The Flash API Documentation is automatically built and deployed to DigitalOcean App Platform whenever changes are pushed to the main branch. This process is handled by GitHub Actions.
- When code is pushed to the
mainbranch, a GitHub Actions workflow is triggered - The workflow:
- Sets up a Node.js environment
- Installs dependencies
- Fetches the latest GraphQL schema from the Flash API
- Builds the static documentation site
- Deploys the built site to DigitalOcean App Platform
To use this deployment pipeline, you need to set up the following secrets in your GitHub repository:
DIGITALOCEAN_ACCESS_TOKEN: A DigitalOcean API token with both read and write permissionsDIGITALOCEAN_APP_ID: The ID of your DigitalOcean App Platform application
For detailed instructions on setting up these secrets correctly, see DIGITALOCEAN_SETUP.md.
- Create a new App on DigitalOcean App Platform
- Select "Static Site" as the resource type
- Configure the app with the following settings:
- Source: GitHub
- Repository: Your Flash API Docs repository
- Branch: main
- Build Command: npm run build
- Output Directory: public
- Environment: Static Site
If you need to deploy manually, you can trigger the workflow from GitHub:
- Go to the "Actions" tab in your GitHub repository
- Select the "Build and Deploy Flash API Docs" workflow
- Click "Run workflow" and select the branch to deploy from
If deployment fails, check:
- GitHub Actions logs for build errors
- DigitalOcean App Platform logs for deployment issues
- Verify that the required secrets are correctly set up in the GitHub repository
To modify the deployment process:
- Edit the
.github/workflows/deploy.ymlfile - Commit and push changes to the repository
The changes will take effect the next time the workflow runs.