Skip to content

Commit

Permalink
Github actions (#1343)
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong authored Jun 24, 2021
1 parent 5923c21 commit 29fa12b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 28 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Deploy
on: [push, pull_request]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.7'

- name: Setup pipenv
run: |
sudo -H pip install -U pipenv
pipenv install
- name: Build
run: |
make
test 6000 -lt $(cat _build/index.html | wc -l)
yarn install
yarn danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Before Deploy
run: |
pipenv run htmlmin _build/index.html _build/index.html
- name: Netlify Actions
# You may pin to the exact commit or the version.
# uses: nwtgck/actions-netlify@f517512ae75beec8896aa7b027c1c72f01816200
uses: nwtgck/[email protected]
with:
publish-dir: _build
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
fails-without-credentials: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: 6f222827-83c1-4882-8d4e-6781973be25d
timeout-minutes: 1
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Open Source Game Clones

[![Build Status](https://travis-ci.com/opengaming/osgameclones.svg?branch=master)](https://travis-ci.com/opengaming/osgameclones)
[![Build and Deploy](https://github.com/opengaming/osgameclones/actions/workflows/main.yml/badge.svg)](https://github.com/opengaming/osgameclones/actions/workflows/main.yml)
[![Netlify Status](https://api.netlify.com/api/v1/badges/6f222827-83c1-4882-8d4e-6781973be25d/deploy-status)](https://app.netlify.com/sites/osgameclones/deploys)

This is the source of [http://osgameclones.com](http://osgameclones.com).
Expand Down

1 comment on commit 29fa12b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.