> For the complete documentation index, see [llms.txt](https://docs.astrotomic.info/stancy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.astrotomic.info/stancy/services/github-actions.md).

# GitHub Actions

It's possible to export and deploy static pages via [GitHub Actions](https://github.com/features/actions). Below is an example workflow file which deploys to [Netlify](/stancy/services/netlify.md). This workflow requires two [GitHub Action Secrets](https://help.github.com/en/github/automating-your-workflow-with-github-actions/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables) you should add to your repository (`NETLIFY_AUTH_TOKEN`, `NETLIFY_SITE_ID`) more details in the [netlify/actions](https://github.com/netlify/actions/tree/master/cli) repo.

{% code title=".github/workflows/deploy.yml" %}

```yaml
name: Deploy

on:
  push:
    branches:
      - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Git checkout
        uses: actions/checkout@v1
      - name: Copy .env
        run: php -r "file_exists('.env') || copy('.env.example', '.env');"
      - name: Install Composer Dependencies
        run: composer install --no-ansi --no-interaction --no-suggest --no-progress --prefer-dist
      - name: Install Yarn Dependencies
        run: yarn install
      - name: Generate key
        run: php artisan key:generate
      - name: Mix assets
        run: yarn production
      - name: Export page
        run: php artisan export --env=prod --skip-assets --skip-deploy
      - name: Netlify deploy
        uses: netlify/actions/cli@master
        with:
          args: deploy --prod
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
```

{% endcode %}

You should adjust it to your needs if you require any custom commands to be able to export your page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.astrotomic.info/stancy/services/github-actions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
