forked from xai-org/grok-1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from creator-codie/creator-codie-patch-1
Create Grok-1.yml
- Loading branch information
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Grok-1 Workflow | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Run tests | ||
run: pytest | ||
- name: Lint code | ||
run: flake8 . | ||
- name: Build and deploy | ||
run: | | ||
python setup.py build | ||
python setup.py bdist_wheel | ||
twine upload dist/* | ||
- name: Update version | ||
run: | | ||
python version.py | ||
- name: Commit and push changes | ||
run: | | ||
git add . | ||
git commit -m "Updated version" | ||
git push origin main | ||
- name: Generate documentation | ||
run: | | ||
pip install sphinx | ||
sphinx-build -b html docs/source docs/_build/html | ||
- name: Deploy documentation | ||
run: | | ||
# Deploy the generated documentation to a server or hosting platform | ||
- name: Send Slack notification | ||
uses: slack/slack@v2 | ||
with: | ||
slack-token: ${{ secrets.SLACK_TOKEN }} | ||
channel: '#deployment-notifications' | ||
text: 'Grok-1 deployment complete!' | ||
- name: Create GitHub release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag-name: ${{ github.sha }} | ||
release-name: 'Grok-1 Release' | ||
draft: false | ||
prerelease: false | ||
- name: Post tweet | ||
uses: twitter/action-tweet@v1 | ||
with: | ||
twitter-token: ${{ secrets.TWITTER_TOKEN }} | ||
tweet: 'Grok-1 has been released! Check it out: (link unavailable)' | ||
- name: Send Microsoft Teams notification | ||
uses: office365/teams@v1 | ||
with: | ||
teams-token: ${{ secrets.TEAMS_TOKEN }} | ||
channel: '#deployment-notifications' | ||
text: 'Grok-1 deployment complete!' | ||
- name: Update README | ||
run: | | ||
echo "Grok-1 has been updated to version ${{ github.sha }}" >> README.md | ||
git add README.md | ||
git commit -m "Updated README" | ||
git push origin main | ||
- name: Send Discord notification | ||
uses: discord/webhook@v1 | ||
with: | ||
discord-token: ${{ secrets.DISCORD_TOKEN }} | ||
channel: '#deployment-notifications' | ||
text: 'Grok-1 deployment complete!' |