name: deploy to neocities 
on:
  push: 
    branches:
      - master

concurrency:
  group: deploy-to-neocities
  cancel-in-progress: true

jobs:
  jekyll:
    name: Build and deploy Jekyll site
    runs-on: ubuntu-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v2

    - name: Build
      uses: actions/jekyll-build-pages@v1
      with:
        destination: "./_site"

    - name: Deploy to neocities 
      uses: bcomnes/deploy-to-neocities@v1
      with: 
        api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
        cleanup: true 
        dist_dir: _site
        protected_files: 'dropbox/*'

