Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up github actions #345

Merged
merged 8 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 0 additions & 135 deletions .drone.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ assignees: ''
---

<!--
If you have a question about how to do something with Library, you can open an issue and we will try to point you in the right direction. Before opening one of these, make sure to consult the demo site which has answers to many common questions: https://nyt-library-demo.herokuapp.com/
If you have a question about how to do something with Library, consider first posting to the
discussion board at https://github.com/nytimes/library/discussions. For more specific cases,
you can open an issue and we will try to point you in the right direction. Before opening one of
these, make sure to consult the demo site which has answers to many common questions: https://nyt-library-demo.herokuapp.com/

You can also submit questions to our Google group: https://groups.google.com/g/nyt-library-community

Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v4
with:
images: nytimes/library

- name: Build and push Docker image
uses: docker/build-push-action@4
with:
context: .
push: ${{ github.event_name != 'pull_request' }} # just to be safe
tags: ${{ steps.meta.outputs.tags }} # automatically tags with latest, version from tag
labels: ${{ steps.meta.outputs.labels }}
34 changes: 34 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main, gh-actions]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x, 18.x]

steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Setup node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm test
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# any changes to workflows should be approved by project owners
./github/workflows @nytimes/interactive-news
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Library [![Build Status](https://cloud.drone.io/api/badges/nytimes/library/status.svg)](https://cloud.drone.io/nytimes/library) ![Supported node versions](https://img.shields.io/badge/dynamic/json?color=informational&label=node&query=%24.engines.node&url=https%3A%2F%2Fraw.githubusercontent.com%2Fnytimes%2Flibrary%2Fmain%2Fpackage.json)
Library ![Supported node versions](https://img.shields.io/badge/dynamic/json?color=informational&label=node&query=%24.engines.node&url=https%3A%2F%2Fraw.githubusercontent.com%2Fnytimes%2Flibrary%2Fmain%2Fpackage.json) [![Tests](https://github.com/nytimes/library/actions/workflows/test.yaml/badge.svg)](https://github.com/nytimes/library/actions/workflows/test.yaml)
========

A collaborative newsroom documentation site, powered by Google Docs.
Expand Down