From e4a26fef915f8dbaa193e2b1227650eeada17144 Mon Sep 17 00:00:00 2001 From: George Mandis Date: Tue, 4 Feb 2020 08:45:40 -0500 Subject: [PATCH] Maded changes to GitHub Actions based publishing --- .github/workflows/publish.yml | 35 +++++++++++++++++++++++++++++++++++ .gitignore | 3 +-- netlify.toml | 3 +-- 3 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e779232 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Publish with GitHub Actions + +on: + push: + branches: + - master + schedule: + # Run this script every 15 minutes + - cron: '*/15 * * * *' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout master branch + uses: actions/checkout@v2 + with: + ref: master + - name: Setup Node.js and install dependencies + uses: actions/setup-node@v1 + with: + node-version: 11.4.0 + - run: npm install + - name: Run build and parse RSS feeds + - run: npm run build --if-present + - name: Commit latest build to ./output folder + uses: github-actions-x/commit@v2.3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + push-branch: 'master' + commit-message: 'Published latest changes to RSS feeds' + force-add: 'true' + files: output/* + name: GitHub Action Bubo Bot + email: action@github.com diff --git a/.gitignore b/.gitignore index 48dbccc..dbf0821 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -node_modules/* -output/index.html \ No newline at end of file +node_modules/* \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 7ae22e8..8594a96 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,4 +1,3 @@ -[build] - command = "npm run build" +[build] publish = "output/"