diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..75f1e66a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: build + +on: + push: + branches: [site] + workflow_dispatch: {} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-ruby@v1 + with: + ruby-version: 2.7 + - name: Bundler cache + uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ runner.os }}-bundler-${{ hashFiles('Gemfile.lock') }} + restore-keys: |- + ${{ runner.os }}-bundler- + ${{ runner.os }}- + - name: Install dependencies + run: bash script/install --deploy + - name: Build + run: bash script/build --deploy + env: + ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JEKYLL_ENV: production + JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PAGES_REPO_NWO: ${{ env.GITHUB_REPOSITORY }}