diff options
| author | Henrique Marques <[email protected]> | 2024-09-24 06:14:46 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-09-24 06:14:46 +0000 |
| commit | da8d56b35f6532e526dea220e120278c15f688a9 (patch) | |
| tree | ac6a1599c9a671e51b3b8c30aee04591fb72292b /.github | |
| parent | a78f407f5e09c67e59c3b21cc068d5489fae6625 (diff) | |
Create main.yml
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/main.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e25aa05 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,37 @@ +name: Deploy to Neocities + +# Only run on changes to the main branch +on: + push: + branches: + - main + +concurrency: # Prevent concurrent deploys doing strange things + group: deploy-to-neocities + cancel-in-progress: true + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + # Step 1: Check out the repository + - uses: actions/checkout@v3 + + # Step 2: Set up Hugo (this downloads and installs Hugo) + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' # You can specify a specific version if needed + + # Step 3: Build the Hugo site + - name: Build the Hugo site + run: hugo + + # Step 4: Deploy the 'public' folder to Neocities + - name: Deploy to Neocities + uses: bcomnes/deploy-to-neocities@v2 + with: + api_token: ${{ secrets.NEOCITIES_API_TOKEN }} # Your Neocities API token stored as a secret + cleanup: false + dist_dir: public # The Hugo output folder |
