Giter VIP home page Giter VIP logo

github-programmers-rank's Introduction

github-programmers-rank

깃허브의 프로그래머스 순위를 나타내는 지표를 svg 형식으로 제공합니다.


🧑‍🎓 Programmers


How to install

1. Fork this Project - 이 프로젝트를 포크합니다.

alt

2. Apply Secret Key - 시크릿 키를 등록합니다.

alt

PROGRAMMERS_TOKEN_ID - 프로그래머스 아이디

PROGRAMMERS_TOKEN_PW - 프로그래머스 비밀번호

3. set Github Action - 깃허브 액션을 설정합니다.

refer: https://github.com/libtv/github-programmers-rank/blob/master/.github/workflows/github-programmers-rank.yml

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: github-programmers-rank

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]
  schedule:
    - cron: '0 5 * * 1-5'

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [14.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

    steps:
    - uses: actions/checkout@v3
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v3
      env: 
        PROGRAMMERS_TOKEN_ID: ${{ secrets.PROGRAMMERS_TOKEN_ID }}
        PROGRAMMERS_TOKEN_PW: ${{ secrets.PROGRAMMERS_TOKEN_PW }}
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - run:  echo ${{ secrets.PROGRAMMERS_TOKEN_ID }}
    - run: npm install
    - run: npm run build
    - run: |
        touch .env
        echo PROGRAMMERS_TOKEN_ID=${{ secrets.PROGRAMMERS_TOKEN_ID }} >> .env
        echo PROGRAMMERS_TOKEN_PW=${{ secrets.PROGRAMMERS_TOKEN_PW }} >> .env
        npm run start

  cron:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [14.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

    steps:
    - uses: actions/checkout@v3
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v3
      env: 
        PROGRAMMERS_TOKEN_ID: ${{ secrets.PROGRAMMERS_TOKEN_ID }}
        PROGRAMMERS_TOKEN_PW: ${{ secrets.PROGRAMMERS_TOKEN_PW }}
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - run:  echo ${{ secrets.PROGRAMMERS_TOKEN_ID }}
    - run: npm install
    - run: npm run build
    - run: |
        touch .env
        echo PROGRAMMERS_TOKEN_ID=${{ secrets.PROGRAMMERS_TOKEN_ID }} >> .env
        echo PROGRAMMERS_TOKEN_PW=${{ secrets.PROGRAMMERS_TOKEN_PW }} >> .env
        npm run start
        

4. Check your Action Flow - 정상적으로 작동되는 지 액션 플로우를 확인합니다.

alt

then, result svg files path is "./lib" : 결과물은 lib 폴더에 존재합니다.

github-programmers-rank's People

Contributors

libtv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.